"""
@作者 = "陈诗"
@email = 3168157154@qq.com
@creative_time = 2025/11/10 0:54
"""
import pandas as pd
# 列表储存
data1 = [
    [1, 'Alice', 20],
    [2, 'Bob', 24],
    [3, 'Cindy', 23]
]
df1 = pd.DataFrame(data1, columns=['oder', 'name', 'age'])  # 在此输入列名
print(df1)
# 字典储存
data2 = {
    'oder': [1, 2, 3],
    'name': ['Alice', 'Bob', 'Cindy'],
    'age': [20, 24, 23]
}  # 键值对以列名为key,每列对应数据为value.一对键值对为一列
df2 = pd.DataFrame(data2)
print(df2)

df3 = pd.read_csv("C:/Users/Lenovo/Desktop/Compressed/第八周课程资料/第八周课程资料/studentsInfo.xlsx", encoding='utf-8')
print(df3.head())
